package com.aikon.wht.cglib;

import lombok.Data;
import net.sf.cglib.proxy.Enhancer;

@Data
public class TestOfCglib {

	private Integer integer;
	
	private String string;
	
	public void pp(String string) {
		print(string);
	}
	
	private void print(String string2) {

		System.out.println(string2);
	}

	public static void main(String[] args){
		
		Enhancer enhancer = new Enhancer();
		enhancer.setSuperclass(TestOfCglib.class);
		enhancer.setCallback(new MethodEnhancer());
		TestOfCglib testOfCglib = (TestOfCglib) enhancer.create();
		testOfCglib.pp("xx");
		
		
	}
	
}
